﻿using Moq;

namespace KWatkins.FluentMoqBuilder
{
	internal abstract class MockBuilder<T> : IMockBuilder<T>
		where T : class
	{
		internal MockBuilder(bool setupAllProperties)
		{
			Mock = new Mock<T>();
			if (setupAllProperties)
			{
				Mock.SetupAllProperties();
			}
		}

		public Mock<T> Mock
		{
			get; 
			private set;
		}

		public T Object
		{
			get
			{
				return Mock.Object;
			}
		}
	}
}
